package com.eshop.logging.service;

import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.scheduling.annotation.Async;
import org.aspectj.lang.ProceedingJoinPoint;
import java.util.List;
import com.eshop.logging.service.dto.LogQueryCriteria;
import org.springframework.data.domain.Pageable;
import com.eshop.logging.domain.Log;
import com.eshop.common.service.BaseService;

public interface LogService extends BaseService<Log>
{
    Object findAllByPageable(final String nickname, final Pageable pageable);
    
    Object queryAll(final LogQueryCriteria criteria, final Pageable pageable);
    
    List<Log> queryAll(final LogQueryCriteria criteria);
    
    Object queryAllByUser(final LogQueryCriteria criteria, final Pageable pageable);
    
    @Async
    void save(final String username, final String ip, final ProceedingJoinPoint joinPoint, final Log log, final Long uid);
    
    @Async
    void saveApp(final String username, final String ip, final ProceedingJoinPoint joinPoint, final Log log, final Long uid);
    
    Object findByErrDetail(final Long id);
    
    void download(final List<Log> logs, final HttpServletResponse response) throws IOException;
    
    void delAllByError();
    
    void delAllByInfo();
}
